TMemo s OnWheel
Otázka od: David Kraina
16. 9. 2004 8:08
Ahoj,
hledam nejake obycejne memo s udalostmi OnMouseWheelUp & OnMouseWheelDown.
Samozrejme free. Muzete nejake doporucit ?
Diky
S pozdravem
David Kraina, DKx
---------------------------
Vedouci vyvojarskeho tymu MX-3, programator
http://DKx.MX-3.cz
http://www.MX-3.cz
Odpovedá: Ondrej Kelle
16. 9. 2004 9:20
> hledam nejake obycejne memo s udalostmi OnMouseWheelUp &
> OnMouseWheelDown.
> Samozrejme free. Muzete nejake doporucit ?
TMemo
mouse wheel udalosti su uz v TControl, ale protected. TMemo ich
nespristupnuje do published sekcie, netusim preco.
type
THackMemo = class(TMemo);
procedure TForm1.FormCreate(Sender: TObject);
begin
THackMemo(Memo1).OnMouseWheelDown := MemoMouseWheelDown;
THackMemo(Memo1).OnMouseWheelUp := MemoMouseWheelUp;
end;
pripadne si mozes na paletu zaregistrovat nieco taketo jednoduche:
type
TWheelMemo = class(TMemo)
published
property OnMouseWheel;
property OnMouseWheelDown;
property OnMouseWheelUp;
end;
HTH
TOndrej